package com.yuchen.ishop.goods;

import com.alibaba.dubbo.rpc.protocol.rest.support.ContentType;
import com.yuchen.core.jdbc.BaseDao;
import com.yuchen.ishop.entity.GoodsContent;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.transaction.annotation.Transactional;

import javax.ws.rs.*;
import javax.ws.rs.core.MediaType;

/**
 *
 */
@Transactional
@Path("goodsContentService")
@Consumes({MediaType.APPLICATION_JSON, MediaType.TEXT_XML})
@Produces({ContentType.APPLICATION_JSON_UTF_8, ContentType.TEXT_XML_UTF_8})
public class GoodsContentServiceImpl implements GoodsContentService {

    @Autowired
    private BaseDao dao;

    @GET
    @Path("get/{id}")
    @Transactional(readOnly = true)
    public GoodsContent get(@PathParam("id") Long id) {
        return dao.fetch(GoodsContent.class, id);
    }
}
